package cn.silver.module.system.enums;

import cn.silver.framework.core.model.DictModel;
import cn.silver.framework.core.utils.StreamUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

/**
 * @author zhouxiaobo
 */

@Getter
@AllArgsConstructor
public enum UserTypeEnums {
    GROUP_USER("00", "集团用户"),
    COMPANY_USER("10", "投资公司用户"),
    TEMP_USER("30", "临时用户"),
    EXTERNAL_USER("90", "外部用户"),
    DEVOPE_USER("91", "运维用户"),
    OTHER_USER("99", "其他用户"),

    ;
    private final String code;
    private final String name;

    public static List<DictModel> getModels() {
        return StreamUtils.toList(Arrays.asList(values()), item -> new DictModel(item.name, item.code));
    }
}
